import time

from router.downloadRouter import route


def main():

    # 域名
    # www.a789xb.com、www.a345bf.com、www.a678nh.com、
    # 排行榜
    # https://www.a345bf.com/top.html
    # 搜索 hongkongdoll
    # https://www.a345bf.com/searchs/index.php?keyboard=hongkongdoll&classid=
    # 搜索 玩偶
    # https://www.a345bf.com/searchs/index.php?keyboard=%E7%8E%A9%E5%81%B6&classid=
    # OnlyFans.com/hongkongdoll

    # 控制台输入参数
    while True:
        saveType="file"
        baseDir = "./download/"
        routeInput = "1"
        keyworkInput = input("请输入关键字：")
        if routeInput=="0" or routeInput=="1":
            route(keyworkInput, routeInput, baseDir, saveType)
            print("下载已完成，重新输入继续下载！")
            continue
        else:
            print("输入有误，请重新输入！")
            continue

    # 代码输入参数
    # routeInput = "1"
    # keyworkInput = "探花" #
    # baseDir = "G:/pythonDown/dollss"
    # saveType="DB"
    # route(keyworkInput, routeInput, baseDir, saveType)




if __name__== "__main__" :
    main()
